<template>
  <el-container style="height: 100vh;">
   <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
    <el-menu router  :default-openeds="['1']"  :default-active="$route.path" >
      <el-submenu index="1">
        <template slot="title"><i class="el-icon-message"></i>内容管理</template>
        <el-menu-item-group>
          <template slot="title">分类</template>
          <el-menu-item index="/categories/edit">新建分类</el-menu-item>
          <el-menu-item index="/categories/list">分类列表</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <template slot="title">装备</template>
          <el-menu-item index="/items/edit">新建装备</el-menu-item>
          <el-menu-item index="/items/list">装备列表</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <template slot="title">英雄</template>
          <el-menu-item index="/heros/edit">新建英雄</el-menu-item>
          <el-menu-item index="/heros/list">英雄列表</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
         <template slot="title"><i class="el-icon-setting"></i>设置</template>
          <el-menu-item-group>
            <template slot="title">用户</template>
            <el-menu-item index="/admin_users/edit">新建用户</el-menu-item>
            <el-menu-item index="/admin_users/list">用户列表</el-menu-item>
          </el-menu-item-group>
      </el-submenu>
    </el-menu>
  </el-aside>

  <el-container>
    <el-header style="text-align: right; font-size: 12px">
      <el-dropdown>
        <i class="el-icon-setting" style="margin-right: 15px"></i>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>查看</el-dropdown-item>
          <el-dropdown-item>新增</el-dropdown-item>
          <el-dropdown-item>删除</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
      <span>王小虎</span>
    </el-header>
    
    <el-main style="">
      <router-view :key="$route.path" />
    </el-main>
  </el-container>
  </el-container>

</template>

<style>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }
  
  .el-aside {
    color: #333;
  }
</style>

<script>
  export default {
    
  };
</script>